<!-- eslint-disable vue/multi-word-component-names -->
<template>
  <div class="father">
    <el-page-header @back="goBack" content="智界M7" class="header"></el-page-header>
    <div class="body">
      <div>
        <div class="body-item1">
        <img src="@/assets/zhijieM7.png" width="100%">
      </div>
      <div class="body-item2">
        <div class="item2-item1" v-for="(item, index) in imgs" :key="index">
          <div v-for="(item1, index1) in item.srcs" :key="index1">
            <img :src="item1" width="100%">
          </div>
        </div>
        <img src="https://res.vmallres.com//uomcdn/CN/pms/202311/2065AC8AD62740F48591DE3D1528B7BB.jpg" width="100%">
      </div>
      </div>
    </div>
    <div class="hello_world">
      <button class="top" @click="toTop">
        <img src="@/assets/backToTop.png" width="100%">
      </button>
    </div>
    <div>
      <router-link to="/z_seven/shop" tag="div">
        <button class="goToShop">立即购买</button>
      </router-link>
    </div>
  </div>
</template>

<script>
import BScroll from 'better-scroll'
export default {
  name: 'z_seven',
  data () {
    return {
      imgs: [
        { srcs: ['https://res.vmallres.com//uomcdn/CN/pms/202311/060EEBA8A91021B9D7105FD1D2237517.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/D28B153E2FD748D0F0A031AD31096A23.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/F55FAE5BC644EE858F2790E61FCCB96C.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/89E17212F68C2FCFE2BD4BA4E92356C3.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/1E032E8330BAA7D9956B9728A09F6BCF.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/7737AABA9E123902086B97711DDD5C10.jpg'] },
        { srcs: ['https://res.vmallres.com//uomcdn/CN/pms/202311/31B0BBA1B459BCC9656C5291146722BD.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/DAD232FAAAD91D4D11A1A89662149539.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/67DA99B1108AB850ED3A288680BCE14D.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/72D10EED96669FE8088D111B0D5C0754.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/3D5A6B1B6131CF41CD2D9911A5761D65.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/60D066C54526DE6BD737E3F3DB2BB051.jpg'] },
        { srcs: ['https://res.vmallres.com//uomcdn/CN/pms/202311/10BAD0D30A2974F94AD0CFD765AAC668.jpg'] },
        { srcs: ['https://res.vmallres.com//uomcdn/CN/pms/202311/4CCC3ECAA784CB8B12FB24A8E23DF669.jpg', 'https://res.vmallres.com//uomcdn/CN/pms/202311/F143D6B8AC35EF00C8236FA1106D5E57.jpg'] }
      ]
    }
  },
  methods: {
    goBack () {
      this.$router.go(-1)
    },
    toTop () {
      window.location.reload()
    }
  },
  mounted () {
    this.$nextTick(() => {
      // eslint-disable-next-line no-undef
      this.scroll = new BScroll('.body', {
        click: true,
        mouseWheel: true
      })
    })
  }
}
</script>

<style scoped>
.goToShop{
  width: 80px;
  height: 40px;
  position: absolute;
  bottom:100px;
  left:190px;
  background-color: red;
  border: solid 1px gray;
  border-radius: 5px;
  opacity: 0.8;
}
.top{
  position: absolute;
  width: 40px;
  height: 40px;
  bottom: 100px;
  right: 5px;
  background-color: #fff;
  border: solid 1px gray;
  border-radius: 50%;
}
.body-item1{
  width: 450px;
  height: 50%;
}
.father{
  width: 450px;
  height: 100%;
}
.header{
  width: 100%;
  height:5%;
}

.body{
  width: 450px;
  height: 630px;
  overflow: hidden;
  background-color: #888;
}
</style>
